<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象相关知识</title>
</head>

<body>
    <script>
        let a = "name"
        let obj = {}  // {name: '我是ed.'}

        // obj.name = '我是ed.'

        obj[a] = '我是ed.'
        console.log(obj)

    </script>
</body>

</html>